import {
	createMemoryHistory,
	createRouter
} from 'vue-router'

import HomeView from './components/routerlearn/HomeView.vue'
import AboutView from './components/routerlearn/AboutView.vue'
import UserPost from './components/routerlearn/UserPost.vue'
const routes = [{
		path: '/',
		component: HomeView
	},
	{
		path: '/about',
		component: AboutView
	},
	{
		path: '/users/:username/posts/:postId',
		component: UserPost
	}
]

const router = createRouter({
	history: createMemoryHistory(),
	routes,
})

export default router